package com.ruoyi.yzchu.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yzchu.mapper.YzcOrderItemMapper;
import com.ruoyi.yzchu.domain.YzcOrderItem;
import com.ruoyi.yzchu.service.IYzcOrderItemService;

/**
 * 订单明细（从）Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-06
 */
@Service
public class YzcOrderItemServiceImpl implements IYzcOrderItemService 
{
    @Autowired
    private YzcOrderItemMapper yzcOrderItemMapper;

    /**
     * 查询订单明细（从）
     * 
     * @param itemId 订单明细（从）主键
     * @return 订单明细（从）
     */
    @Override
    public YzcOrderItem selectYzcOrderItemByItemId(Long itemId)
    {
        return yzcOrderItemMapper.selectYzcOrderItemByItemId(itemId);
    }

    /**
     * 查询订单明细（从）列表
     * 
     * @param yzcOrderItem 订单明细（从）
     * @return 订单明细（从）
     */
    @Override
    public List<YzcOrderItem> selectYzcOrderItemList(YzcOrderItem yzcOrderItem)
    {
        return yzcOrderItemMapper.selectYzcOrderItemList(yzcOrderItem);
    }

    /**
     * 新增订单明细（从）
     * 
     * @param yzcOrderItem 订单明细（从）
     * @return 结果
     */
    @Override
    public int insertYzcOrderItem(YzcOrderItem yzcOrderItem)
    {
        return yzcOrderItemMapper.insertYzcOrderItem(yzcOrderItem);
    }

    /**
     * 修改订单明细（从）
     * 
     * @param yzcOrderItem 订单明细（从）
     * @return 结果
     */
    @Override
    public int updateYzcOrderItem(YzcOrderItem yzcOrderItem)
    {
        return yzcOrderItemMapper.updateYzcOrderItem(yzcOrderItem);
    }

    /**
     * 批量删除订单明细（从）
     * 
     * @param itemIds 需要删除的订单明细（从）主键
     * @return 结果
     */
    @Override
    public int deleteYzcOrderItemByItemIds(Long[] itemIds)
    {
        return yzcOrderItemMapper.deleteYzcOrderItemByItemIds(itemIds);
    }

    /**
     * 删除订单明细（从）信息
     * 
     * @param itemId 订单明细（从）主键
     * @return 结果
     */
    @Override
    public int deleteYzcOrderItemByItemId(Long itemId)
    {
        return yzcOrderItemMapper.deleteYzcOrderItemByItemId(itemId);
    }
}
